import java.io.Serializable;

/**
 * transient关键字对象进行序列化时,不会写入序列化流中
 *
 * @author dragon
 * @version 1.0
 * @description
 * @date created in 2018-11-13
 */
public class Person implements Cloneable, Serializable {

    private String name;

    private Integer age;

    private transient Student s;

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public Person clone() throws CloneNotSupportedException {
        return (Person) super.clone();
    }

    public Student getS() {
        return s;
    }

    public void setS(Student s) {
        this.s = s;
    }

    public Object test() throws Exception {
        System.out.println("父类test方法运行了");
        return "asdf";
    }

}
